#include "CustomEvent.h"

CustomEvent::CustomEvent() : QEvent(CSTM_EVENT_BASE)
{

}
CustomEvent::~CustomEvent()
{

}

ModbusSendEvent::ModbusSendEvent(const QByteArray& data) : QEvent(CSTM_EVENT_MODBUS_SEND)
{
    _data = data;
}

ModbusSendEvent::~ModbusSendEvent()
{

}

QByteArray ModbusSendEvent::data()
{
    return _data;
}


ModbusRecvEvent::ModbusRecvEvent(const QByteArray& data) : QEvent(CSTM_EVENT_MODBUS_RECV)
{
    _data = data;
}

ModbusRecvEvent::~ModbusRecvEvent()
{

}

QByteArray ModbusRecvEvent::data()
{
    return _data;
}

